/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.supinfo.youfood.service;

import com.supinfo.youfood.dao.MenuDao;
import com.supinfo.youfood.entity.Menu;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.Stateless;

/**
 *
 * @author Michael
 */
@Stateless
public class MenuService {
    
    @EJB
    private MenuDao menuDao;
    
    public List<Menu> getAllMenus() {
        return menuDao.getAllMenus();
    }
    
    public List<Menu> getAllActifMenus() {
        return menuDao.getAllActifMenus();
    }
    
    public Menu ajouterMenu(Menu menu)
    {
        return menuDao.ajouterMenu(menu);
    }
    
    public Menu findMenuById(Long id_menu) 
    {
        return menuDao.findMenuById(id_menu);
    }
    
    public Menu refreshMenu(Menu menu)
    {
        return menuDao.refreshMenu(menu);
    }
    
    public void deleteMenu(Menu menu)
    {
        menuDao.supprimerMenu(menu);
    }
    
}
